<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddStatusToElOrderItemTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('el_order_item', function (Blueprint $table) {
            $table->tinyInteger('status')->default(1)->after('is_send'); //item状态：1 正常；2 取消(该item售后已完成，取消item)
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('el_order_item', function (Blueprint $table) {
            $table->dropColumn(['status']);
        });
    }
}
